﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Dcms.Common;
using System.Text;

public partial class Aspx_cn_sendEmail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            SendEmail();
        }
    }
    protected void SendEmail()
    {
       StringBuilder EmailStr = new StringBuilder();
        EmailStr.Append("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"left\">");
        EmailStr.Append("<tr class=\"wz\">");
        EmailStr.Append(" <td width=\"14%\" align=\"center\" bgcolor=\"#EBEBEB\"><span style=\"font-weight: bold\">应聘简历</span></td>");
        EmailStr.Append("<td width=\"76%\" bgcolor=\"#EBEBEB\">&nbsp;</td>");
        EmailStr.Append("<td width=\"10%\" bgcolor=\"#EBEBEB\">&nbsp;</td>");
        EmailStr.Append("</tr>");
        EmailStr.Append("<tr align=\"center\">");
        EmailStr.Append("<td colspan=\"3\" style=\"padding:10px;\"><table cellspacing=\"0\" width=\"93%\" border=\"0\">");
        EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">应聘职位：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("Title") + "</td>");
        EmailStr.Append("</tr>");
        EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">姓名：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("Content") + "</td>");
        EmailStr.Append("</tr>");
        EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">性别：</span> </td>");      
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("UserTel") + "</td>");
        EmailStr.Append("</tr>");
        EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">籍贯：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("UserName") + "</td>");
        EmailStr.Append("</tr>");
        EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">出生年月：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag4") + "</td>");
        EmailStr.Append("</tr>");
        EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">民族：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag1") + "</td>");
        EmailStr.Append("</tr>");
		
		
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">政治面貌：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag5") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">学历：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("UserEmail") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">家庭住址：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag6") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">联系电话：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("UserIM") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">E-mail：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag7") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">原工作单位及职务：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag2") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">工作时间：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag8") + "</td>");
        EmailStr.Append("</tr>");
		EmailStr.Append("<tr class=\"hs\">");
        EmailStr.Append("<td align=\"right\"><span class=\"STYLE1\">其它：</span> </td>");
        EmailStr.Append("<td width=\"425\" align=\"left\">" + DcmsRequest.GetFormString("ExFlag3") + "</td>");
        EmailStr.Append("</tr>");
		
        EmailStr.Append("</table></td>");
        EmailStr.Append("</tr></table>");
        string Titlestr=DateTime.Now.ToShortDateString()+"留言";
        bool IsSendState = false;
        IsSendState=sendEmail.sendMail("market@lionac.com", Titlestr, EmailStr.ToString(), "lionac@sohu.com");
        if (IsSendState == true)
        {
            Jscript.AlertAndRedirect("发送成功", "/");
        }
        else
        {
            Jscript.AlertAndBack("发送失败，请检查信息填写是否完整！！！");
        }
		
		
		
    }
}
